home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_9.lha
/
7_9
/
7_9_dlist.h
< prev
next >
Wrap
Text File
|
1993-08-08
|
822b
|
38 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ manage a doubly-linked list
lass dlist
dlink *last;
dlink *curr;
ublic:
dlist();
dlist(dlink*);
~dlist();
int isempty() { return last != 0; }
void clear();
// set current pointer to the ends of the list
void reset() { curr = 0; }
// move around the list, leaving the links there
int next(dlink *&e);
int prev(dlink *&e);
// move around the list, removing the links
int getnext(dlink *&e);
int getprev(dlink *&e);
// manipulate around the beginning
// and end of the list
void insert(dlink*);
void append(dlink*);
// manipulate around the current entry
void inserthere(dlink*);
void appendhere(dlink*);
;